export const limit= function(duration=300) {
	let timer = null;
	return () => {
		clearTimeout(timer)
		return new Promise(resolve =>{
			timer = setTimeout(()=>{
						resolve()
						timer=null;
			}, duration)
		
		})
	}

}
